const mongoose = require('./db.js');//引入数据库连接模块

const Schema = mongoose.Schema;//拿到数据库对应的集合对象

const commentSchema = new Schema({
    userid:{type:String},
    cartid:{type:String},
    proid: {type: String },
    type: { type: String },
    brand: { type: String },
    barndimg: { type: String },
    proname: { type: String },
    price: { type: Number },
    flag: { type: Number }, // 是否推荐
    proimg: { type: String },
    note: { type: String },
    num: { type: Number },
    commentid: { type: String },
    rating:{type:Number}

})//设计用户集合的字段以及数据类型


module.exports = mongoose.model('Comment', commentSchema);